package com.cybertron.lockdown.spider.domain;

import com.cybertron.lockdown.spider.SpiderListener;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

import java.util.List;

/**
 * Created by xiezhouyan on 15-1-10.
 */
@XStreamAlias("site")
public class Site {

    @XStreamAsAttribute
    @XStreamAlias("domain")
    private String domain;

    @XStreamAsAttribute
    @XStreamAlias("listenerClass")
    private String listenerClass;

    @XStreamAlias("source")
    private Source source;

    @XStreamAlias("target")
    private Target target;

    @XStreamImplicit(itemFieldName = "seed")
    private List<Seed> seeds;

    private SpiderListener listener;

    public Source getSource() {
        return source;
    }

    public void setSource(Source source) {
        this.source = source;
    }

    public String getDomain() {
        return domain;
    }

    public void setDomain(String domain) {
        this.domain = domain;
    }

    public String getListenerClass() {
        return listenerClass;
    }

    public void setListenerClass(String listenerClass) {
        this.listenerClass = listenerClass;
    }

    public Target getTarget() {
        return target;
    }

    public void setTarget(Target target) {
        this.target = target;
    }

    public void setListener(SpiderListener listener) {
        this.listener = listener;
    }

    public List<Seed> getSeeds() {
        return seeds;
    }

    public void setSeeds(List<Seed> seeds) {
        this.seeds = seeds;
    }

    public SpiderListener listener() {
        return this.listener;
    }
}
